﻿using System;
using System.Collections.Generic;
using System.Text;

namespace time1
{
    public class hannuota
    {

        int count = 1;

        void move(int n, char x, char y)
        {
            Console.Write("第" + count + "次    " + n + ":{0}-->{1}\n", x, y);
        }



        public void hanoi(int n, char one, char two, char three)
        {


            if (n == 1)
            {
                move(n, one, three);
                count++;
            }
            else
            {
                hanoi(n - 1, one, three, two);
                move(n, one, three);
                count++;
                hanoi(n - 1, two, one, three);
            }
        }

        public  void main1()
        {
            int m;
            Console.WriteLine("input the number of disks:");
            m = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("the step to moving %3d diskes:\n", m);
            hanoi(m, 'A', 'B', 'C');
        }


    }
}
